package cndw.core.dispatch;

import java.io.Serializable;

import org.springframework.stereotype.Component;

/**
 * Request外观类,提供给控制器类使用
 * 
 * @author zuojie.x
 */
@Component
public class RequestFacade implements Request {

	private Request getRequest() {
		return ThreadLocalRequest.get();
	}

	@Override
	public String getPlayerId() {
		return getRequest().getPlayerId();
	}

	@Override
	public Session getSession() {
		return getRequest().getSession();
	}

	@Override
	public String getHostAddress() {
		return getRequest().getHostAddress();
	}
	
	@Override
	public int getActionId() {
		return getRequest().getActionId();
	}

	@Override
	public Serializable[] getParams() {
		return getRequest().getParams();
	}

	@Override
	public String getSign() {
		return getRequest().getSign();
	}
}
